﻿using MediatR;
using RBAC.LuFang.API.Application.Command.imgCommand;
using RBAC.LuFang.Domain.Traceability;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.imgCommandHandler
{
    //显示相关资质
    public class RelatedCommandHandler:IRequestHandler<imgRelatedCommand,List<imges>>
    {
        private readonly IslaughterService _slaService;

        public RelatedCommandHandler(IslaughterService slaService)
        {
            _slaService = slaService;
        }

        public async Task<List<imges>> Handle(imgRelatedCommand request, CancellationToken cancellationToken)
        {
            return await _slaService.GetRelatedPic(request.imgtype, request.goodsid);
        }
    }
}
